package cn.findviewbydream.evil.app.controller

import cn.findviewbydream.evil.app.dto.ChefOrderBean
import cn.findviewbydream.evil.app.service.ChefService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

/********************************************
 * 工程名：MealOrder
 * 包名：cn.findviewbydream.evil.app.controller
 * 时间：17-1-22
 * 作者：白雨濃 evil
 * 邮箱：evilbai@foxmail.com
 * 内容：厨师端首页
 ********************************************/
@RestController
class ChefController(@Autowired var chefService: ChefService)
{
    @RequestMapping("/app/get/chef/order/list")
    fun getOrderBeanList(typeOfWorkId: Int?): List<ChefOrderBean>?
            = chefService.getOrderBeanList(typeOfWorkId)

    @RequestMapping("/app/update/order/item")
    fun postOrderItemState(orderItemId: Int, state: Int): Boolean?
            = chefService.postOrderItemState(orderItemId, state)
}